package com.mass.core.sys.file.utils;

import java.util.UUID;

/**
 * 文件上传辅助工具类</p>
 *
 * @author liwenjun
 * @version 1.0.0
 * @date 2016/11/21 9:41
 */
public class FileUploadUtil {

    /**
     * 获得一个UUID
     * @return String UUID
     */
    public static String getUUID(){
        String uuid = UUID.randomUUID().toString().toUpperCase();
        //去掉“-”符号
        String UUID = uuid.substring(0,8)+uuid.substring(9,13)+uuid.substring(14,18)+uuid.substring(19,23)+uuid.substring(24);
        return UUID;
    }

    public static String getFileName(){
        return "F"+getUUID();
    }


}
